#! /bin/bash

OUT=`ps -ef | grep -i NjuskaloNotifier | grep -i java`
DIR=/export/home/etomjak/NjuskaloNotifier

if [ "${OUT}" == "" ]
then
  echo `date '+%y-%m-%d %H:%M:%S'` " - ERROR - Process NjuskaloNotifier NOT running!!!" | tee -a ${DIR}/CheckNjuskaloNotifier.log
  ${DIR}/StartNjuskaloNotifier.sh 
else
  echo `date '+%y-%m-%d %H:%M:%S'` " - Process NjuskaloNotifier is RUNNING!!!" | tee -a ${DIR}/CheckNjuskaloNotifier.log
fi